﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace Serietheque
{
    /// <summary>
    /// Logique d'interaction pour App.xaml
    /// </summary>
    public partial class App : Application
 
    {
        //private const int MINIMUM_SPLASH_TIME = 750; // Miliseconds 
        //private const int SPLASH_FADE_TIME = 250;     // Miliseconds    
        //protected override void OnStartup(StartupEventArgs e)
        //{
        //    //#region Single instance
        //    //// Get Reference to the current Process
        //    //Process thisProc = Process.GetCurrentProcess();
        //    //// Check how many total processes have the same name as the current one
        //    //if (Process.GetProcessesByName(thisProc.ProcessName).Length > 1)
        //    //{
        //    //    // If ther is more than one, than it is already running.
        //    //    MessageBox.Show("Application is already running.");
        //    //    Application.Current.Shutdown();
        //    //    return;
        //    //}

        //    //base.OnStartup(e); 
        //    //#endregion


        //    #region Splashscreen
        //    //// Step 1 - Load the splash screen       
        //    //SplashScreen splash = new SplashScreen("splash.png");
        //    //splash.Show(false, true);
        //    //// Step 2 - Start a stop watch       
        //    //Stopwatch timer = new Stopwatch();
        //    //timer.Start();
        //    //// Step 3 - Load your windows but don't show it yet      
        //    //base.OnStartup(e);
        //    //Principal main = new Principal();
        //    //// Step 4 - Make sure that the splash screen lasts at least two seconds    
        //    //timer.Stop();
        //    //int remainingTimeToShowSplash = MINIMUM_SPLASH_TIME - (int)timer.ElapsedMilliseconds;
        //    //if (remainingTimeToShowSplash > 0)
        //    //    Thread.Sleep(remainingTimeToShowSplash);
        //    //// Step 5 - show the page        
        //    //splash.Close(TimeSpan.FromMilliseconds(SPLASH_FADE_TIME));
        //    //main.Show(); 
        //    #endregion
        //}
    }


}